﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyMvc.Model;
using MyMvc.IBLL;
using MyMvc.BLL;
using MyMvc.Model.Models;

namespace BlueHome
{
    public partial class Profile : System.Web.UI.Page
    {
        IArticleService _articleService = new ArticleService();
        protected void Page_Load(object sender, EventArgs e)
        {
            int ids;

            string str = Server.HtmlDecode(Request["ID"]);

            if (Server.HtmlDecode(Request["ID"]) == null)
            {
                ids = 1;
            }
            else 
            {
                ids = Convert.ToInt32(Server.HtmlDecode(Request["ID"]));
            }
            //查询出当前的文档信息
            var currentArticle = _articleService.LoadEntities(c => c.ID == ids).FirstOrDefault();
            Title.Text = currentArticle.Title;
        }
    }
}